Optimal. Leaf size=65 \[ -\frac {2 d g (e f+d g) x}{e^2}-\frac {d (f+g x)^2}{e}-\frac {(f+g x)^3}{3 g}-\frac {2 d (e f+d g)^2 \log (d-e x)}{e^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {862, 78}
\begin {gather*} -\frac {2 d (d g+e f)^2 \log (d-e x)}{e^3}-\frac {2 d g x (d g+e f)}{e^2}-\frac {d (f+g x)^2}{e}-\frac {(f+g x)^3}{3 g} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 862
Rubi steps
\begin {align*} \int \frac {(d+e x)^2 (f+g x)^2}{d^2-e^2 x^2} \, dx &=\int \frac {(d+e x) (f+g x)^2}{d-e x} \, dx\\ &=\int \left (-\frac {2 d g (e f+d g)}{e^2}-\frac {2 d (e f+d g)^2}{e^2 (-d+e x)}-\frac {2 d g (f+g x)}{e}-(f+g x)^2\right ) \, dx\\ &=-\frac {2 d g (e f+d g) x}{e^2}-\frac {d (f+g x)^2}{e}-\frac {(f+g x)^3}{3 g}-\frac {2 d (e f+d g)^2 \log (d-e x)}{e^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 73, normalized size = 1.12 \begin {gather*} -\frac {e x \left (6 d^2 g^2+3 d e g (4 f+g x)+e^2 \left (3 f^2+3 f g x+g^2 x^2\right )\right )+6 d (e f+d g)^2 \log (d-e x)}{3 e^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 95, normalized size = 1.46
method | result | size |
norman | \(-\frac {g^{2} x^{3}}{3}-\frac {\left (2 d^{2} g^{2}+4 d e f g +e^{2} f^{2}\right ) x}{e^{2}}-\frac {g \left (d g +e f \right ) x^{2}}{e}-\frac {2 d \left (d^{2} g^{2}+2 d e f g +e^{2} f^{2}\right ) \ln \left (-e x +d \right )}{e^{3}}\) | \(88\) |
default | \(-\frac {\frac {1}{3} g^{2} x^{3} e^{2}+d e \,g^{2} x^{2}+e^{2} f g \,x^{2}+2 d^{2} g^{2} x +4 d e f g x +e^{2} f^{2} x}{e^{2}}-\frac {2 d \left (d^{2} g^{2}+2 d e f g +e^{2} f^{2}\right ) \ln \left (-e x +d \right )}{e^{3}}\) | \(95\) |
risch | \(-\frac {g^{2} x^{3}}{3}-\frac {d \,g^{2} x^{2}}{e}-f g \,x^{2}-\frac {2 d^{2} g^{2} x}{e^{2}}-\frac {4 d f g x}{e}-f^{2} x -\frac {2 d^{3} \ln \left (-e x +d \right ) g^{2}}{e^{3}}-\frac {4 d^{2} \ln \left (-e x +d \right ) f g}{e^{2}}-\frac {2 d \ln \left (-e x +d \right ) f^{2}}{e}\) | \(107\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 95, normalized size = 1.46 \begin {gather*} -2 \, {\left (d^{3} g^{2} + 2 \, d^{2} f g e + d f^{2} e^{2}\right )} e^{\left (-3\right )} \log \left (x e - d\right ) - \frac {1}{3} \, {\left (g^{2} x^{3} e^{2} + 3 \, {\left (d g^{2} e + f g e^{2}\right )} x^{2} + 3 \, {\left (2 \, d^{2} g^{2} + 4 \, d f g e + f^{2} e^{2}\right )} x\right )} e^{\left (-2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.56, size = 94, normalized size = 1.45 \begin {gather*} -\frac {1}{3} \, {\left (6 \, d^{2} g^{2} x e + {\left (g^{2} x^{3} + 3 \, f g x^{2} + 3 \, f^{2} x\right )} e^{3} + 3 \, {\left (d g^{2} x^{2} + 4 \, d f g x\right )} e^{2} + 6 \, {\left (d^{3} g^{2} + 2 \, d^{2} f g e + d f^{2} e^{2}\right )} \log \left (x e - d\right )\right )} e^{\left (-3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.17, size = 70, normalized size = 1.08 \begin {gather*} - \frac {2 d \left (d g + e f\right )^{2} \log {\left (- d + e x \right )}}{e^{3}} - \frac {g^{2} x^{3}}{3} - x^{2} \left (\frac {d g^{2}}{e} + f g\right ) - x \left (\frac {2 d^{2} g^{2}}{e^{2}} + \frac {4 d f g}{e} + f^{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.80, size = 100, normalized size = 1.54 \begin {gather*} -2 \, {\left (d^{3} g^{2} + 2 \, d^{2} f g e + d f^{2} e^{2}\right )} e^{\left (-3\right )} \log \left ({\left | x e - d \right |}\right ) - \frac {1}{3} \, {\left (g^{2} x^{3} e^{3} + 3 \, d g^{2} x^{2} e^{2} + 6 \, d^{2} g^{2} x e + 3 \, f g x^{2} e^{3} + 12 \, d f g x e^{2} + 3 \, f^{2} x e^{3}\right )} e^{\left (-3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.07, size = 127, normalized size = 1.95 \begin {gather*} -x^2\,\left (\frac {d\,g^2+2\,e\,f\,g}{2\,e}+\frac {d\,g^2}{2\,e}\right )-x\,\left (\frac {e\,f^2+2\,d\,g\,f}{e}+\frac {d\,\left (\frac {d\,g^2+2\,e\,f\,g}{e}+\frac {d\,g^2}{e}\right )}{e}\right )-\frac {g^2\,x^3}{3}-\frac {\ln \left (e\,x-d\right )\,\left (2\,d^3\,g^2+4\,d^2\,e\,f\,g+2\,d\,e^2\,f^2\right )}{e^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________